#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QtSql>
#include <QPrinter>
#include <QSystemTrayIcon>

namespace Ui {
class MainWindow;
}

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    explicit MainWindow(QWidget *parent = 0);
    ~MainWindow();

private slots:
    void on_pushButton_clicked();

    void on_cmdPrint_clicked();

    void on_cmdPrintPreview_clicked();

    void printPreview();
    void on_cmdGeneratePDF_clicked();

    void on_actionPrint_triggered();

    void on_actionPrint_Preview_triggered();

    void on_actionE_xit_triggered();

    void on_actionAbout_triggered();

    void on_actionSet_ODBC_Data_Source_triggered();

    void tray_show_clicked();
private:
    Ui::MainWindow *ui;
    QSqlDatabase odbc_db;
    QPrinter *printer;
    QString odbc_dsn;
    QSystemTrayIcon *tray_icon;
    QMenu *trayMenu;
    QAction *tray_show;
};

#endif // MAINWINDOW_H
